{% extends 'base.html' %}
{% load  static %}

{% block css %}
    <style>
        .account {
            width: 400px;
            border: 1px solid #dddddd;
            border-radius: 5px;
            box-shadow: 5px 5px 20px #aaa;

            margin-left: auto;
            margin-right: auto;
            margin-top: 100px;
            padding: 20px 40px;
        }
    </style>
{% endblock %}

{% block content %}

    <div class="container">
        <div class="row">
            <div class="col-md-4 col-md-offset-4">
                <div class="account">
                    <h2 class="text-center">用户名登录</h2>
                    <form method="post" novalidate>
                        {% csrf_token %}
                        {% for field in form %}
                            <div class="form-group">
                                <label for="{{ field.id_for_label }}">{{ field.label }}</label>
                                <div class="row">
                                    <div class="col-xs-12">
                                        {{ field }}
                                        <span class="error_msg" style="color: red">{{ form.errors.0 }}</span>
                                    </div>
                                </div>
                            </div>
                        {% endfor %}
                        <div>
                            <button type="submit" id="login_sms" class="btn btn-primary">登 录</button>
                            <div class="pull-right">
                                <a href="/login_code/">验证码登录>>></a>
                            </div>
                        </div>
                        <div>
                            <label>
                                还没有账号？
                                <a href='#'>注册账号</a>
                                加入我们吧！
                            </label>
                        </div>

                    </form>
                </div>
            </div>
        </div>
    </div>



{% endblock %}